//@import "../assets/less/fz.less";
@color: #333; //定义主文字色 
@svgcolor: 'deb175';
@logos: #deb175; //logo颜色
@base: #409EFF; //定义主色调
@hei: #040000;
@c1: #0e7131; ///定义颜色1
@c2: #ffde00; //定义常用颜色2
@hs: #f3f3f3; //定义灰色调
@sh: #828282; //深灰 



.txU(@txU: Uppercase) {
  text-transform: @txU;
}

//字母全大写
.txC(@txC: Capitalize) {
  text-transform: @txC;
}

// 字母全小写
.pr(@pr: relative) {
  position: @pr;
}

.pa(@pa: absolute) {
  position: @pa;
}

.fl(@left: left) {
  float: @left;
}

.fr(@right: right) {
  float: @right;
}

.clear(@clear: both) {
  clear: @clear;
}

//控制几行显示省略号
.zihang(@h: 1) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: @h;
  -webkit-box-orient: vertical;
}

.FM(@faA: "Arial") {
  font-family: @faA;
}

//字体样式
@j: "../images/"; //定义背景图片路径，方便调用@{j}

.tc(@center: center) {
  text-align: @center;
}

.tl(@left: left) {
  text-align: @left;
}

.tr(@right: right) {
  text-align: @right;
}

//这个是兼容IE的内联，父元素设置font-size:0px，则可解决内联默认有边距的问题
.dis-in(@in: inline) {
  _display: @in;
  zoom: 1;
  display: inline-block;
  vertical-align: middle;
}

.after(@s: after) {
  &:after {
    content: "";
    display: block;
    width: 100%;
    overflow: hidden;
    clear: both;
  }
}

.bjimg(@top: top, @center: center) {
  background-repeat: no-repeat;
  background-position: @top @center;
}

.html() {
  * {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
  }

  html,
  body {
    margin: 0px auto;
    box-sizing: border-box;
    .pr;
    line-height: 1.6;
    -webkit-text-size-adjust: none;
    margin: 0px auto;
    min-height: 100%;
    font-size: 14px;
    color: @color;
    font-family: "Microsoft Yahei", '楷体', '新宋体', Arial, Helvetica, sans-serif;
  }

  a {
    color: @color;
    text-decoration: none; //定义A链接

    &:hover {
      color: @base;
    }
  }

  html {
    -webkit-text-size-adjust: none;
  }

  ul,
  li {
    list-style: none;
  }

  img {
    border: none;
    line-height: 1;
    vertical-align: middle;
    max-width: 100%;
    height: auto;
  }

  //字的部分
  h3,
  .h3,
  h4,
  .h4,
  h5,
  .h5,
  h6,
  .h6 {
    font-weight: normal;
  }

  .bjhs {
    background-color: @hs;
  }

  //背景灰色

  .bjbs {
    background-color: #fff !important;
  }

  //背景白色

  .bjbase {
    background-color: @base;
  }

  .tc {
    text-align: center;
  }

  .tl {
    text-align: left;
  }

  .tr {
    text-align: right;
  }

  .en {
    .txU;
  }

  //英文大写

  //定义一些间隔
  .t10 {
    margin-top: 10px;
  }

  .t20 {
    margin-top: 20px;
  }

  .t30 {
    margin-top: 30px;
  }

  .t40 {
    margin-top: 40px;
  }

  .t50,
  .w1200.t50 {
    margin-top: 50px;
  }

  .xh-fluid {
    padding: .2rem;
  }

  .xh-no-fluid {
    margin: 0px -0.2rem;
  }

  @media screen and (max-width: 1200px) {

    //兼容1200宽度的边距
    .t20 {
      margin-top: 10px;
    }

    .t30 {
      margin-top: 15px;
    }

    .t40 {
      margin-top: 20px;
    }

    .t50,
    .w1200.t50 {
      margin-top: 20px;
    }
  }

  //定义图片的包裹层.img和.imgs，
  //.img是限制最大为100%； 
  //.imgs是默认100%，鼠标移动过去还能放大效果
  .imgs {
    overflow: hidden;
    line-height: 1;

    img {
      width: 100%;
      .transition(.7s);
      vertical-align: middle;
      height: auto;
    }

    &:hover img {
      .scale(1.05);
    }
  }

  .max-img {
    img {
      max-width: 100%;
      height: auto;
    }
  }

  .img {
    img {
      max-width: 100%;
      height: auto;
    }
  }

  .fixed-img {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
    background-attachment: fixed;
  }

  //定义一下表单的一些默认兼容，如兼容苹果的提交框
  .ie8 {
    position: fixed;
    top: 0px;
    font-size: 24px;
    background: #fff;
    padding: 15px;
    color: red;
    z-index: 9999999;
    .tc;
    width: 100%;
  }

  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    -webkit-appearance: none;
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
  }

  input {
    -webkit-appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
  }

  input:focus {
    outline: none;
  }

  textarea {
    -webkit-appearance: none;
    border-radius: 0;
    outline: none;
  }

  .clear {
    clear: both;
  }
}